import heapq
# 模拟
# class Solution(object):
#     def maximumScore(self, a, b, c):
#         st = [-a, -b, -c]
#         heapq.heapify(st)
#         ans = 0
#         while True:
#             node0 = heapq.heappop(st)
#             node1 = heapq.heappop(st)
#             if node1 == 0:
#                 return ans
#             else:
#                 heapq.heappush(st, node0 + 1)
#                 heapq.heappush(st, node1 + 1)
#                 ans += 1

#数学
class Solution(object):
    def maximumScore(self, a, b, c):
        st = [a, b, c]
        st.sort()
        if st[2] >= st[0] + st[1]:
            return st[0] + st[1]
        else:
            base = st[2]
            t = st[0] + st[1] - st[2]
            return base + t // 2